Continuation Semantics for PROLOG with Cut
نویسندگان
چکیده
We present a denotational continuation semantics for Prolog with cut. First a uniform language B is studied, which captures the control flow aspects of Prolog. The denotational semantics for B is proven equivalent to a transition system based operational semantics. The congruence proof relies on the representation of the operational semantics as a chain of approximations and on a convenient induction principle. Finally, we interpret the abstract language B such that we obtain equivalent denotational and operational models for Prolog itself. Section
منابع مشابه
Specifying Prolog Trace Models with a Continuation Semantics
Byrd's box model is a ne grained Prolog execution model that can be the basis of high level debugging tools. In this article, we provide a formal speciication of Byrd's box model, based on an already existing operational and denotational continuation semantics for Pro-log with cut. We show how this speciication can be extended to specify richer Prolog trace models. To be able to experiment with...
متن کاملDealing with Explicit Exceptions in Prolog
Existing logic languages provide some simple "extra-logical" constructs for control manipulation , such as the cut of standard Prolog and the exception handling constructs of other versions of Prolog (e.g. SICStus Prolog). Aspects speciically concerning the ow of control in a language can be quite naturally modelled by means of the Denotational Semantics, and in particular the Denotational Sema...
متن کاملA structured alternative to Prolog with simple compositional semantics
Prolog's very useful expressive power is not captured by traditional logic programming semantics, due mainly to the cut and goal and clause order. Several alternative semantics have been put forward, exposing operational details of the computation state. We propose instead to redesign Prolog around structured alternatives to the cut and clauses, keeping the expressive power and computation mode...
متن کاملWe Present an Operational Model O and a Continuation Based Denotational Model D for a Section 1 Introduction
uniform variant of Prolog, including the cut operator. The two semantical definitions make use of higher order transformations Φ and Ψ, respectively. We prove O and D equivalent in a novel way by comparing yet another pair of higher order transformations Φ ˜ and Ψ ˜ , that yield Φ and Ψ, respectively , by application of a suitable abstraction operator. In [BV] we presented both an operational a...
متن کاملFrom Interpreter to Logic Engine by Defunctionalization
Starting from a continuation-based interpreter for a simple logic programming language, propositional Prolog with cut, we derive the corresponding logic engine in the form of an abstract machine. The derivation originates in previous work (our article at PPDP 2003) where it was applied to the lambda-calculus. The key transformation here is Reynolds’s defunctionalization that transforms a tail-r...
متن کامل